#!/bin/bash
#$ -N KEY_JOB_ID
#$ -S /bin/bash
#$ -o KEY_LOGFILE
# join stderr and stdout
  
unset SGE_ROOT
cd /home/xyh/nfs_xyh/ClassMC

#echo $NSLOTS
tmphosts=`cat $TMPDIR/machines`
hosts=`echo $tmphosts | sed 's/\ /,/g'`


mpirun -np $NSLOTS -H $hosts \
    -mca btl_openib_if_include mlx4_0:1 -mca btl sm,self,openib \
    -mca coll_fca_np 4 -mca coll_fca_enable 0 \
    bin/ClassMC KEY_INI
  
# -bind-to core
# "-mca coll_fca_enable 1" accelerates collective communications, but some
# programs hangs with such an option when lens is used (i.e., b130.q).
# If your program does not run correctly, set "-mca coll_fca_enable 0".
